﻿using NLog;
using StackExchange.Redis;
using TeachlyQBank.DbPool;

namespace TeachlyQBank.DbServer
{
    public class AnswerServer
    {
        private readonly IHttpContextAccessor _httpContextAccessor; // 操作cookie中数据的类
        private readonly OracleConnectionAdapter _oracle; // 操作oracle的类
        private readonly IConnectionMultiplexer _redis;  // 操作redis的类
        private readonly Logger _logger;  //记录日志的类

        // 完成依赖注入
        public AnswerServer(OracleConnectionAdapter oracle, IConnectionMultiplexer redis, IHttpContextAccessor httpContextAccessor)
        {
            _httpContextAccessor = httpContextAccessor;
            _redis = redis;
            _logger = LogManager.GetCurrentClassLogger();
            _oracle = oracle;
        }
    }
}
